﻿@model IEnumerable<MVCApp.Models.District>

@{
    ViewBag.NoPostCode = Model.Count(m => m.PostCodeFirst == 0) == Model.Count();
}

<table id="myDistricts">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>        
        <th>
            @Strings.DistrictReportTypes_Complete
        </th>
    </tr>
        @foreach (var item in Model)
        {
        <tr>
            <td>
                @Html.ActionLink(item.Name, "Index", "District", new { id = item.Id }, null)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UserReports_DistrictComplete.FirstOrDefault().Date)
            </td>
        </tr>
        }
    
</table>
